﻿@model WaboSystemMenuViewModel

<ul class="nav">

    @foreach (var menuItem in Model.Menu)
    {
        <li class="@(menuItem.Selected?"active":"")" >@Html.ActionLink(menuItem.Title,"Index",menuItem.ControllerName,new { area = "Manager" },null)</li>
    }
    
</ul>

<ul class="nav pull-right">
    @if (ViewBag.ActiveUser != null)
    {
        <li>
            <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
                @if (ViewBag.UnreadMessageCount > 0)
                {
                    <b class="icon-envelope"></b>
                }
                @ViewBag.ActiveUser.name @ViewBag.ActiveUser.last_name
                <b class="caret"></b>
            </a>
            <ul class="dropdown-menu">
                <li><a href="@Url.Action("Settings","User")">@Messages.Profile</a></li>                
                <li>
                    <a href="@Url.Action("MailBox","User")">
                        @Messages.UserMessages
                        @if (ViewBag.UnreadMessageCount > 0)
                        {
                            @:( @ViewBag.UnreadMessageCount )
                        }
                    </a>
                </li>
                <li class="divider"></li>
                <li><a href="@Url.Action("Logout","Logon")">@Messages.Logout</a></li>
            
            </ul>
        </li>
    }
</ul>

